package com.luyuan.gallery.service.impl;

import java.util.List;
import com.luyuan.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.luyuan.gallery.mapper.ExhiGalleryArtworkMapper;
import com.luyuan.gallery.domain.ExhiGalleryArtwork;
import com.luyuan.gallery.service.IExhiGalleryArtworkService;

/**
 * 展厅作品关联Service业务层处理
 * 
 * @author luyuan
 * @date 2025-11-13
 */
@Service
public class ExhiGalleryArtworkServiceImpl implements IExhiGalleryArtworkService {
    @Autowired
    private ExhiGalleryArtworkMapper exhiGalleryArtworkMapper;

    /**
     * 查询展厅作品关联
     * 
     * @param id 展厅作品关联主键
     * @return 展厅作品关联
     */
    @Override
    public ExhiGalleryArtwork selectExhiGalleryArtworkById(Long id) {
        return exhiGalleryArtworkMapper.selectExhiGalleryArtworkById(id);
    }

    /**
     * 查询展厅作品关联列表
     * 
     * @param exhiGalleryArtwork 展厅作品关联
     * @return 展厅作品关联
     */
    @Override
    public List<ExhiGalleryArtwork> selectExhiGalleryArtworkList(ExhiGalleryArtwork exhiGalleryArtwork) {
        return exhiGalleryArtworkMapper.selectExhiGalleryArtworkList(exhiGalleryArtwork);
    }

    /**
     * 新增展厅作品关联
     * 
     * @param exhiGalleryArtwork 展厅作品关联
     * @return 结果
     */
    @Override
    public int insertExhiGalleryArtwork(ExhiGalleryArtwork exhiGalleryArtwork) {
        exhiGalleryArtwork.setCreateTime(DateUtils.getNowDate());
        return exhiGalleryArtworkMapper.insertExhiGalleryArtwork(exhiGalleryArtwork);
    }

    /**
     * 修改展厅作品关联
     * 
     * @param exhiGalleryArtwork 展厅作品关联
     * @return 结果
     */
    @Override
    public int updateExhiGalleryArtwork(ExhiGalleryArtwork exhiGalleryArtwork) {
        return exhiGalleryArtworkMapper.updateExhiGalleryArtwork(exhiGalleryArtwork);
    }

    /**
     * 批量删除展厅作品关联
     * 
     * @param ids 需要删除的展厅作品关联主键
     * @return 结果
     */
    @Override
    public int deleteExhiGalleryArtworkByIds(Long[] ids) {
        return exhiGalleryArtworkMapper.deleteExhiGalleryArtworkByIds(ids);
    }

    /**
     * 删除展厅作品关联信息
     * 
     * @param id 展厅作品关联主键
     * @return 结果
     */
    @Override
    public int deleteExhiGalleryArtworkById(Long id) {
        return exhiGalleryArtworkMapper.deleteExhiGalleryArtworkById(id);
    }
}
